/* 내 식단표  */
function myFood() {
	var foodScheduleStartdate = $("#datepicker").val();
	
	$.ajax({
		url: 'schedule.spring',
		method:'post',
		data:{action:'myFood',foodScheduleStartdate:foodScheduleStartdate},
		success:function(html) {
			$(".parsingPage").html(html);
		},
		error:function(){
			alert("fail");	
		}

	});

}

function foodchoice(IngestPurpose,Class,Classfication) {
	$.ajax({
		url : 'schedule.spring',
		type: 'POST',
		data:{action:'foodMain', foodIngestPurpose:IngestPurpose, 
			foodClass:Class,
			foodClassfication: Classfication},
			success:function(html) {
				$(".parsingPage").html(html);
			},
			error:function(){
				alert("fail"); 
			}
	});
}

function myfoodchoice(IngestPurpose,Class,Classfication) {
	var foodScheduleStartdate = $("#datepicker").val();
	
	$.ajax({
		url : 'schedule.spring',
		type: 'POST',
		data:{action:'myFood', foodIngestPurpose:IngestPurpose, 
			foodClass:Class,
			foodClassfication: Classfication,
			foodScheduleStartdate:foodScheduleStartdate},
			success:function(html) {
				$(".parsingPage").html(html);
			},
			error:function(){
				alert("fail"); 
			}
	});
}

function foodInformationView(foodNo) {
	$.ajax({
		url : 'schedule.spring?action=informationView&foodNo='+foodNo,
			success:function(html) {
				$("#food-informationView").html(html);
			},
			error:function(){
				alert("fail"); 
			}
	});
}
function foodScheduleChoice(Class) {
	$.ajax({
		url : 'schedule.spring',
		type: 'POST',
		data:{action:'myFoodSchedule', foodClass:Class},
			success:function(html) {
				$(".foodS-chedule-Choice").html(html);
			},
			error:function(){
				alert("fail"); 
			}
	});
}

function foodScheduleInformationView(foodNo) {
	$.ajax({
		url : 'schedule.spring?action=informationView&foodNo='+foodNo,
			success:function(html) {
				$("#food-informationView").html(html);
			},
			error:function(){
				alert("fail"); 
			}
	});
}
function foodScheduleAdd(No) {
	var date = $("#datepicker").val();
	var button = $(":input:radio[name=foodScheduleChoice]:checked").val();
	$.ajax({
		url: 'schedule.spring',
		method:'post',
		data:{action:'myFoodAdd',foodNo:No,foodScheduleStartdate:date,foodScheduleChoice:button},
		success:function(html) {
			$(".parsingPage").html(html);
		},
		error:function(){
			alert("fail"); 
		}

	});
}

function foodScheduleRemove(No) {
	var date = $("#datepicker").val();
	$.ajax({
		url: 'schedule.spring',
		method:'post',
		data:{action:'myFoodRemove',foodScheduleStartdate:date,foodScheduleNo:No},
		success:function(html) {
			$(".parsingPage").html(html);
		},
		error:function(){
			alert("fail"); 
		}

	});
}
